<?php
class OrderModel extends RelationModel{
	public $_link = array(
			    
			'OrderProduct'=> array(
				'mapping_type'=>HAS_MANY, 
				'class_name'=>'OrderProduct', 
				'foreign_key'=>'order_id', 
				'mapping_name'=>'Products'),

			'Express'=>array(
				'mapping_type'  =>BELONGS_TO, 
			    'class_name'  =>'Express',
			    'mapping_name' => 'Express',
			    'foreign_key' => 'express_corp_id'),

	);
	//自动填充设置
	public $_auto =	array(
		array('create_time','get_client_time',self::MODEL_INSERT,'function'),
		array('update_time','get_client_time',self::MODEL_BOTH,'function'),
	);
}